<script>
	export default {
		onLaunch: function() {
			this.$api.Yingshi.Token().then(res=>{
				uni.setStorageSync('accessToken', res.data.token);
			})
			if (!uni.getStorageSync('companyName')) {
				this.$api.Shop.Detail_C().then(res => {
					const {
						name,
						logo
					} = res.data.company
					uni.setStorageSync('companyName', name);
					uni.setStorageSync('companyLogo', logo);
					uni.reLaunch({
						url: '/home_c/index'
					})

				})
			}
			uni.setStorageSync('pageUrl', '/home_c/index')
			if (uni.getStorageSync('token')) {
			
				this.$api.My.Detail().then(res => {
					uni.setStorageSync('user', res.data);
				})
			}
		},
		onShow: function() {},
		onHide: function() {}
	}
</script>

<style lang="scss">
	@import "@/static/style/iconfont.css";
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";

	.Skeleton {
		background: linear-gradient(90deg, #f1f2f4 25%, #e6e6e6 37%, #f1f2f4 50%);
		background-size: 400% 100%;
		border-radius: 3px;
		animation: loading 1.5s infinite;
	}

	@keyframes loading {
		/* 骨架屏的动画 */

		0% {
			background-position: 100% 50%;
		}

		100% {
			background-position: 0 50%;
		}
	}

	.popupTitle {
		padding: 20rpx 40rpx;
		display: flex;
		justify-content: space-between;
		border-bottom: 1rpx solid #f1f1f1;
		align-items: center;
	}

	.popupBody {
		padding: 20rpx 40rpx 0;
		height: 50vh;
	}

	view {
		font-size: 24rpx;
	}

	.inputBox {
    flex-wrap: wrap;
		padding-top: 10rpx;
		padding-bottom: 10rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;
		border-radius: 8rpx;
		display: flex;
		align-items: center;
		border-width: 0.5px !important;
		border-color: #dadbde !important;
		border-style: solid;
		color: #303133;
		font-size: 28rpx;
		text-align: left;
	}

	.u-popup {
		>view:first-child {
			width: 100vw;
			height: 100vh;
		}
	}
</style>